<?php
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'list';
if($_RQ['op']=='list'){
	$daytime = mktime(0,0,0,date('m'),date('d'),date('Y'));
	$return['merch']=$merch;
	$return['member']=cfc('core')->member_show($_SESSION['uid']);
	$return['lunum']=pdo_count('jy_yxgoodserpfw_merchlog',array('uniacid'=>$_SESSION['uniacid'],'type'=>0,'mid'=>$_SESSION['uid']));
	$return['chunum']=pdo_count('jy_yxgoodserpfw_merchlog',array('uniacid'=>$_SESSION['uniacid'],'type'=>1,'mid'=>$_SESSION['uid']));
	$return['tuium']=pdo_count('jy_yxgoodserpfw_merchlog',array('uniacid'=>$_SESSION['uniacid'],'type'=>3,'mid'=>$_SESSION['uid']));
	$return['lunumday']=pdo_count('jy_yxgoodserpfw_merchlog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>0,'code_type'=>1,'mid'=>$_SESSION['uid']));
	$return['lunum2day']=pdo_count('jy_yxgoodserpfw_merchlog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>0,'code_type'=>0,'mid'=>$_SESSION['uid']));
	$return['chunumallday']=pdo_count('jy_yxgoodserpfw_merchlog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>1,'xiang_id'=>0,'mid'=>$_SESSION['uid']));
	$return['chunumday']=pdo_count('jy_yxgoodserpfw_merchlog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>1,'xiang_id'=>0,'mid'=>$_SESSION['uid']));
	$return['chunum2day']=pdo_count('jy_yxgoodserpfw_merchlog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>1,'xiang_id >'=>0,'mid'=>$_SESSION['uid']));
	$return['tuinumday']=pdo_count('jy_yxgoodserpfw_merchlog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>3,'xiang_id'=>0,'mid'=>$_SESSION['uid']));
	$return['tuinum2day']=pdo_count('jy_yxgoodserpfw_merchlog',array('createtime >'=>$daytime,'uniacid'=>$_SESSION['uniacid'],'type'=>3,'xiang_id >'=>0,'mid'=>$_SESSION['uid']));
	$return['buynum']=pdo_count('jy_yxgoodserpfw_merchlog',array('uniacid'=>$_SESSION['uniacid'],'type'=>1,'tomid'=>$_SESSION['uid']));
	$return['footernav']=array(
		array('title'=>'代理商','icon'=>'icon-shouye','action'=>'jy_yxgoodserpfw/member.index/'),
		array('title'=>'操作记录','icon'=>'icon-yonghujieru','action'=>'jy_yxgoodserpfw/member.kulog/'),
	);
	set_html('title','经销管理');
	exi($return);
}